// CHistpltPara.h : header file
//

#ifndef __CHISTPLTPARA_H__
#define __CHISTPLTPARA_H__

/////////////////////////////////////////////////////////////////////////////
// CHistpltPara dialog
#include "BaseDefine.h"
#include "resource.h"
#include "amsEdit.h"
#include "xmldialog.h"
#include "GeoStat.h"
#include "GsStru.h"
#include "StatGraph.h"
#include "afxwin.h"
//#include "FileDialogHelper.h"
//#include "dmBlockData.h"
class C2DBaseView;
class CDataTable;
class dmDataArray;
class dmConsBlockData;
class CdmDBBase;

class CHistpltPara : public CXMLDialog
{

public:
// 	C2DBaseView * m_p2dview;
	CGeoStatGraph* m_StatGraphObj;
	GsEDAData* m_DiscPnts;

	dmConsBlockData* m_blockModelData;
	dmDataArray *m_dataArray;
	dmDataArray *m_oreArray;
	long m_StatPntIndex;

protected:
	void AllDataSetWindowText();
	void ReadNode();
	void WriteNode();
	void OpenDrillFile();
	void OnChangeCbDec();
	void OnChangeCbFrevalue();
	void OnChangeCbAttvalue();
	void ChangeEtInputfile();
	bool IsFilterField(CString fldname);
public:
	void ShowHighDlg(bool bSHow);
	bool m_bShow;
	bool m_bInitDlg;
	std::vector<UINT> m_BtnsIDVector;
	CRect m_rect;
	
// Construction
public:
	CHistpltPara(CWnd* pParent = NULL);
	~CHistpltPara();


// Dialog Data
	//{{AFX_DATA(CHistpltPara)
	enum { IDD = IDD_HISTPLTPARA };
	CAMSNumericEdit	m_edDataMin;
	CAMSNumericEdit	m_edDataMax;
	CStatic	m_stmin;
	CStatic	m_stmax;
	CSpinButtonCtrl	m_spbin;
	CSpinButtonCtrl	m_spdec;
	CAMSNumericEdit	m_decno;
	CEdit	m_file;
	CBCGPComboBox	m_dec;
	CBCGPComboBox	m_frevalue;
	CBCGPComboBox	m_attvalue;
	CBCGPComboBox	m_type;
	CBCGPComboBox	m_scale;
	CBCGPComboBox	m_var;
	CString	m_strFile;
	//GetDlgItem(IDC_CV_DATAFL)->SetWindowText(FILE_TEXT(m_datafl));CString m_strFullFileName;
	CAMSNumericEdit	m_bin;
	CAMSNumericEdit	m_attMin;
	CAMSNumericEdit	m_attMax;
	CAMSNumericEdit	m_freMax;
	CString	m_title;
	BOOL	m_bLogTrans;
	int		m_nAttvalue;
	int		m_nDec;
	int		m_nFrevalue;
	int		m_nScale;
	int		m_nType;
	int		m_nVar;
	//}}AFX_DATA
	double	m_dataMin;
	double	m_dataMax;
	long	m_lBin;
	long	m_lDec;
	float	m_fAttmax;
	float	m_fAttmin;
	float	m_fFrevalue;
	CString m_strX;


// Overrides
	// ClassWizard generate virtual function overrides
	//{{AFX_VIRTUAL(CHistpltPara)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	// Generated message map functions
	//{{AFX_MSG(CHistpltPara)
	afx_msg void OnInputfile();
	virtual BOOL OnInitDialog();
	afx_msg void OnSelchangeCbDec();
	afx_msg void OnSelchangeCbFrevalue();
	afx_msg void OnSelchangeCbAttvalue();
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	virtual void OnOK();
	afx_msg void OnChangeEtAttmax();
	afx_msg void OnChangeEtAttmin();
	afx_msg void OnChangeEtBin();
	afx_msg void OnChangeEtDec();
	afx_msg void OnChangeEtFrevalue();
	afx_msg void OnChangeEtMax();
	afx_msg void OnChangeEtMin();
	afx_msg void OnChangeEtInputfile();
	afx_msg void OnCvParaManager();
	afx_msg void OnDestroy();
	afx_msg void OnSelchangeCbScale();
	afx_msg void OnSelchangeCbType();
	afx_msg void OnSelchangeCbVar();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	CDataTable *m_dataTable;	
	long m_recordnum;

	CdmDBBase *m_pDB; // new drill [8/17/2009 jyb]
	

	CStatic m_wndStatic;
	afx_msg void OnBnClickedBtnTop();
	float m_fPrecent;
	BOOL m_bFreqPlot;
	BOOL m_bCunFreqPlot;
};

#endif // __CHISTPLTPARA_H__
